import random

num = random.randint(1, 10)
print(f"产生的随机数是：{num}")

if int(input("请输入：")) == num:
    print("恭喜你猜对了：%s" % num)

elif int(input("请输入：")) == num:
    print("恭喜你猜对了：%s" % num)

elif int(input("请输入：")) == num:
    print("恭喜你猜对了：%s" % num)
else:
    print("三次机会用完了")
